package com.ruoyi.ucar.service.impl;

import java.util.List;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.ucar.domain.TOrderProductData;
import com.ruoyi.ucar.mapper.TOrderProductDataMapper;
import com.ruoyi.ucar.service.ITOrderProductDataService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 订单与产品数据关联Service业务层处理
 * 
 * @author sungangbin
 * @date 2025-05-13
 */
@Service
public class TOrderProductDataServiceImpl extends ServiceImpl<TOrderProductDataMapper, TOrderProductData> implements ITOrderProductDataService
{
    @Autowired
    private TOrderProductDataMapper tOrderProductDataMapper;

    /**
     * 查询订单与产品数据关联
     * 
     * @param id 订单与产品数据关联主键
     * @return 订单与产品数据关联
     */
    @Override
    public TOrderProductData selectTOrderProductDataById(Long id)
    {
        return tOrderProductDataMapper.selectTOrderProductDataById(id);
    }

    /**
     * 查询订单与产品数据关联列表
     * 
     * @param tOrderProductData 订单与产品数据关联
     * @return 订单与产品数据关联
     */
    @Override
    public List<TOrderProductData> selectTOrderProductDataList(TOrderProductData tOrderProductData)
    {
        return tOrderProductDataMapper.selectTOrderProductDataList(tOrderProductData);
    }

    /**
     * 新增订单与产品数据关联
     * 
     * @param tOrderProductData 订单与产品数据关联
     * @return 结果
     */
    @Override
    public int insertTOrderProductData(TOrderProductData tOrderProductData)
    {
        return tOrderProductDataMapper.insertTOrderProductData(tOrderProductData);
    }

    /**
     * 修改订单与产品数据关联
     * 
     * @param tOrderProductData 订单与产品数据关联
     * @return 结果
     */
    @Override
    public int updateTOrderProductData(TOrderProductData tOrderProductData)
    {
        return tOrderProductDataMapper.updateTOrderProductData(tOrderProductData);
    }

    /**
     * 批量删除订单与产品数据关联
     * 
     * @param ids 需要删除的订单与产品数据关联主键
     * @return 结果
     */
    @Override
    public int deleteTOrderProductDataByIds(Long[] ids)
    {
        return tOrderProductDataMapper.deleteTOrderProductDataByIds(ids);
    }

    /**
     * 删除订单与产品数据关联信息
     * 
     * @param id 订单与产品数据关联主键
     * @return 结果
     */
    @Override
    public int deleteTOrderProductDataById(Long id)
    {
        return tOrderProductDataMapper.deleteTOrderProductDataById(id);
    }
}
